<%--
  Created by IntelliJ IDEA.
  User: webrx
  Date: 2017/6/9
  Time: 12:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>轮播列表</title>
    <style>
        .cc{
            margin: 20px auto;
            width: 80%;
            height: 50%;

        }
        .cc th,td{
            border: 1px solid #c7ff17;
            text-align: center;
        }
        .yes{

        }
        .no{
            opacity: .3;
        }
    </style>
    <script>
        function show(id, flag) {
            location.href = 'lunboadd?action=update&id='+id+'&f=' + flag;
        }
    </script>
</head>
<body>

<table class="cc" cellspacing="0">

    <tr>
        <th>ID</th>
        <th>名字</th>
        <th>链接</th>
        <th>是否显示</th>
        <th>图片</th>
        <th>发布时间</th>

        <th>删除</th>
    </tr>
    <c:forEach items="${list}" var="add">
    <tr>
        <td>${add.id}</td>
        <td>${add.lunbo_name}</td>
        <td>${add.lunbo_link}</td>
        <td>
           <c:if test="${add.lunbo_state=='y'}">
               <label class="yes"><input type="checkbox"  checked onclick="show(${add.id},'n')">显示</label>
           </c:if>
            <c:if test="${add.lunbo_state=='n'}">
                <label class="no"><input type="checkbox"  checked onclick="show(${add.id},'y')">显示</label>
            </c:if>

        </td>
        <td><img src="../upload/lunbo/${add.lunbo_image} " style="width: 30px;height: 20px"></td>
        <td>${add.lunbo_time}</td>

        <td><a href="lunboadd?id=${add.id}&image=${add.lunbo_image}&action=delete">删除</a></td>
    </tr>
    </c:forEach>
    <tr>
        <td colspan="10"><a href="#">去前台</a>&nbsp;<a href="../sell/sell_lunboadd.jsp">添加轮播图</a></td>
    </tr>
</table>
</body>
</html>
